
import 'package:example/pages/hints_action_empty_page.dart';
import 'package:example/pages/hints_empty_page.dart';
import 'package:example/pages/image_hints_empty_page.dart';
import 'package:example/pages/loading_empty_page.dart';
import 'package:flutter/material.dart';
import 'package:fluttertenroadui/fluttertenroadui.dart';

class EmptyPage extends StatelessWidget {
  static const String routeName = '/empty';

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    final List<TLStaticSectionData> sectionList = [
      TLStaticSectionData(
        itemList: [
          TLStaticItemData(
            title: 'Loading',
            accessoryType: TLStaticListCellAccessoryType.accDetail,
            onTap: (){
              Navigator.pushNamed(context, LoadingEmptyPage.routeName);
            }
          ),
          TLStaticItemData(
              title: 'Hints',
              accessoryType: TLStaticListCellAccessoryType.accDetail,
              onTap: (){
                Navigator.pushNamed(context, HintsEmptyPage.routeName);
              }
          ),
          TLStaticItemData(
              title: 'Hints and Action Button',
              accessoryType: TLStaticListCellAccessoryType.accDetail,
              onTap: (){
                Navigator.pushNamed(context, HintsActionEmptyPage.routeName);
              }
          ),
          TLStaticItemData(
              title: 'Image and Hints',
              accessoryType: TLStaticListCellAccessoryType.accDetail,
              onTap: (){
                Navigator.pushNamed(context, ImageHintsEmptyPage.routeName);
              }
          ),
        ],
      ),
    ];

    return Scaffold(
      appBar: AppBar(
        title: Text('empty'),
      ),
      body: Container(
        height: double.infinity,
        child: TLStaticList(
          shrinkWrap: true,
          separatorBuilder: (context, index) {
            return Divider(height: 1, color: Colors.grey,);
          },
          sections: sectionList,
        ),
      ),
    );
  }


}